package com.tt.dp.factory.simple;

import com.tt.dp.factory.model.CheesePizza;
import com.tt.dp.factory.model.Pizza;
import com.tt.dp.factory.model.SalchichaPizza;

public class SimplePizzaFactory {

    public Pizza createPizza(String type) {

        Pizza pizza = null;

        if("1".equals(type)){
            pizza = new CheesePizza();
        }else if("2".equals(type)){
            pizza = new SalchichaPizza();
        }

        return pizza;
    }

}
